#ifndef BPL_ENTITY
#define BPL_ENTITY

#include <boost/shared_ptr.hpp>
#include "EntityManager.h"

namespace BPL
{
typedef unsigned int EntityId;
typedef unsigned int FamilyId;
class System;

class Entity
{
public:
    Entity(EntityId id);
	~Entity();
    EntityId getID() const;
    template<typename T> boost::shared_ptr<T> getAs() const;


    static EntityManager* entityManager;
	void addSystem(System* system);

protected:
    unsigned int mpt_id;
	std::vector<System*> mpt_systems;
};

template<typename T> boost::shared_ptr<T> Entity::getAs() const
{
    return entityManager->getComponent<T>(mpt_id);
}


}

#endif

